/* eslint-disable react/display-name */
import React from 'react';

const AudioContext = React.createContext();

export default AudioContext;

export function withAudioContext(Component) {
	return props => (
		<AudioContext.Consumer>
			{audioContext => <Component {...props} audioContext={audioContext} />}
		</AudioContext.Consumer>
	);
}
